﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using eTerm.MsSql.DbProvider;

namespace eTerm.Platform.Web
{
    public abstract class BaseEntityPage<T>:BasePage where T:new()
    {
        /// <summary>
        /// 从数据库获取实体.
        /// </summary>
        /// <returns>`0.</returns>
        protected virtual T Get() {
            return default(T);
        }

        /// <summary>
        /// 保存实体至数据库
        /// </summary>
        protected virtual void Save() {
            throw new NotImplementedException();
        }


        /// <summary>
        /// 从页面获取实体.
        /// </summary>
        /// <returns>`0.</returns>
        protected virtual T GetFromPage() {
            return default(T);            
        }


    }
}
